package com.catdou.formatter.mvc.config;

import com.catdou.formatter.mvc.jackson.NullValueSerializerInterceptor;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

/**
 * @author James
 */
public class JacksonConfig {

    public JacksonConfig(MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter) {
        mappingJackson2HttpMessageConverter.getObjectMapper()
                .setAnnotationIntrospector(new NullValueSerializerInterceptor());
    }
}
